<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    {{info}}
    <ul>
        <!--v-for="变量名 in 数组" 遍历指令-->
        <li v-for="name in arr">{{name}}</li>
    </ul>
    <table border="3">
        <caption>商品列表</caption>
        <tr>
            <th>商品编号</th>
            <th>商品标题</th>
            <th>商品价格</th>
            <th>商品销量</th>
        </tr>
        <tr v-for="(p,i) in productArr">
            <td>{{i + 1}}</td>
            <td>{{p.title}}</td>
            <td>{{p.price}}</td>
            <td>{{p.saleCount}}</td>
        </tr>
    </table>
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            info: "循环遍历",
            arr: ["刘大", "关二", "张三", "赵四", "马五", "黄六"],
            productArr: [{title: "双飞燕鼠标", price: 20, saleCount: 100},
                {title: "罗技键盘", price: 80, saleCount: 200},
                {title: "联想电脑", price: 5220, saleCount: 500}]
        },
        methods: {}
    })
</script>
</body>
</html>